package com.wcgksoft.entity.ZData;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import javax.xml.crypto.Data;
import java.util.Date;

/**
 * @author 阿良
 * @version 1.0.0
 * @ClassName BasicData.java
 * @Description 基本数据类型 存储数据表 基本数据包括温度、湿度、co2、pm、气压等等
 * @createTime 2020年04月06日 10:15:00
 */
@Entity
@Table(name = "sys_basic_data")
public class BasicData {


  /**
   * id
   */
  @Id
  @Basic(optional = false)
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id", nullable = false)
  private Integer id;


  /**
   * 数据值
   */
  @Column(name = "data", nullable = true)
  private String data;
  /**
   * 湿度值
   */
  @Column(name = "hmdata", nullable = true)
  private String hmdata;

  /**
   * 设备编号，dtu或者网关的ID
   */
  @Column(name = "no", nullable = true)
  private String no;

  /**
   * 通道号
   */
  @Column(name = "com", nullable = true)
  private String com;

  /**
   * 数据类型
   */
  @Column(name = "data_type", nullable = true)
  private String datatype;

  /**
   * 采集时间
   */
  @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  @Column(name = "acquisition_time", nullable = true)
  private Date Acquisitiontime;


  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getData() {
    return data;
  }

  public void setData(String data) {
    this.data = data;
  }

  public String getNo() {
    return no;
  }

  public void setNo(String no) {
    this.no = no;
  }

  public String getCom() {
    return com;
  }

  public void setCom(String com) {
    this.com = com;
  }

  public String getDatatype() {
    return datatype;
  }

  public void setDatatype(String datatype) {
    this.datatype = datatype;
  }

  public Date getAcquisitiontime() {
    return Acquisitiontime;
  }

  public void setAcquisitiontime(Date acquisitiontime) {
    Acquisitiontime = acquisitiontime;
  }

  public String getHmdata() {
    return hmdata;
  }

  public void setHmdata(String hmdata) {
    this.hmdata = hmdata;
  }
}
